package com.eastfair.auth.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.annotation.annotation.vo.VoInfo;
import com.eastfair.annotation.model.BaseVoGroupClass;
import com.eastfair.auth.enumeration.OrganizationOrgTypeEnum;
import com.eastfair.demand.auth.OrganizationVoGroupClass;
import com.eastfair.projectcore.vo.MenuVO;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 实体类
 * 
 * </p>
 *
 * @author ligang
 * @since 2021-07-16
 */
@Data
@ApiModel(value = "OrganizationVo", description = "")
public class OrganizationVo implements Serializable{
    private static final long serialVersionUID = 1L;



    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private Long id;

    /**
     * 组织名称
     */
    @ApiModelProperty(value = "组织名称")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private String name;

    /**
     * 组织类型#{project:项目;p_exhibitor_classify:项目下的展商分类;p_sponsor_classify:项目下的主办分类;p_audience_classify:项目下的观众分类;p_builder_classify:项目下的搭建商分类;p_court_classify:项目下的主场分类;p_transport_classify:项目下的主运分类;p_booking_classify:项目下的场馆内部分类;exhibition:展会;e_exhibitor_classify:展会下的展商分类;e_sponsor_classify:展会下的主办;e_audience_classify:展会下的观众分类;e_builder_classify:展会下的搭建商分类;e_court_classify:展会下的主场分类;e_transport_classify:展会下的主运分类;e_booking_classify:展会下的场馆内部分类;exhibitor:展商;sponsor:主办;builder:搭建商;court:主场;transport:主运;booking:场馆内部;staff:用户;other:其他-枚举
     */
    @ApiModelProperty(value = "组织类型#{project:项目;p_exhibitor_classify:项目下的展商分类;p_sponsor_classify:项目下的主办分类;p_audience_classify:项目下的观众分类;p_builder_classify:项目下的搭建商分类;p_court_classify:项目下的主场分类;p_transport_classify:项目下的主运分类;p_booking_classify:项目下的场馆内部分类;exhibition:展会;e_exhibitor_classify:展会下的展商分类;e_sponsor_classify:展会下的主办;e_audience_classify:展会下的观众分类;e_builder_classify:展会下的搭建商分类;e_court_classify:展会下的主场分类;e_transport_classify:展会下的主运分类;e_booking_classify:展会下的场馆内部分类;exhibitor:展商;sponsor:主办;builder:搭建商;court:主场;transport:主运;booking:场馆内部;staff:用户;other:其他-枚举")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private OrganizationOrgTypeEnum orgType;
    /**
     * 组织code码
     */
    @ApiModelProperty(value = "组织code码")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.findAllOrganization.class})
    private String code;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private Long tenantId;
    /**
     * 华为同步机构id
     */
    @ApiModelProperty(value = "华为同步机构id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private String huaweiOrgId;
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private Long subsystemId;


    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private Integer sort;

    /**
     * 父级id
     */
    @ApiModelProperty(value = "父级id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private Long parentId;

    /**
     * 是否生效(默认1：可用 0:不可用)
     */
    @ApiModelProperty(value = "是否生效(默认1：可用 0:不可用)")
    @TableField(value = "is_enabled")
    @Excel(name = "是否生效(默认1：可用 0:不可用)")
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private Integer isEnabled;

    /**
     * 子节点信息
     */
    @ApiModelProperty(value = "子节点信息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
//    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    @VoInfo(groups = {OrganizationVoGroupClass.findAllUserOfOrg.class,OrganizationVoGroupClass.findMenuOrFunctionById.class,OrganizationVoGroupClass.findAllOrganization.class})
    private List<OrganizationVo> childVoList;

    /**
     * 资源信息
     */
    @ApiModelProperty(value = "资源信息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.findAllOrganization.class})
    private List<ResourceOrganizationVo> resourceOrganizationVo;

    /**
     * 用户信息
     */
    @ApiModelProperty(value = "用户信息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.findAllOrganization.class})
    private List<UserOrganizationVo> userOrganizationVoList;


    /**
     * 用户信息
     */
    @ApiModelProperty(value = "用户信息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.findAllUserOfOrg.class})
    private List<UserAccountVo> userAccountVoList;
    /**
     * 角色信息
     */
    @ApiModelProperty(value = "角色信息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.findAllOrganization.class,OrganizationVoGroupClass.findMenuOrFunctionById.class})
    private List<RoleVo> roleVoList;


    /**
     * 角色id集合
     */
    @ApiModelProperty(value = "角色id集合")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.findAllOrganization.class,OrganizationVoGroupClass.findMenuOrFunctionById.class})
    private List<Long> roleIds;
    /**
     * 菜单信息
     */
    @ApiModelProperty(value = "菜单信息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.findMenuOrFunctionById.class})
    private List<MenuVO> menuVOList;

    /**
     * 数据类型 user用户 org组织
     */
    @ApiModelProperty(value = "数据类型 user用户 org组织")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private String dataType;

    /**
     * 团队ID
     */
    @ApiModelProperty(value = "团队ID")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {BaseVoGroupClass.all.class})
    private Long teamId;


    /**
     * 负责人集合
     */
    @ApiModelProperty(value = "负责人集合")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {BaseVoGroupClass.all.class})
    private String leaderIds;
}
